home *** CD-ROM | disk | FTP | other *** search
Wrap
global gObjects, gStates, gCursorlist, sQTCharSprite, gLastKeyList, gCurKeyList, sQTSPRITE, gLastCursor, gSoundchannels, gCPU on enterF69 MakeDynamic(#Scanner, #timesLeverPulled, 0) MakeDynamic(#Scanner, #timesScanButtonClicked, 0) if getaProp(getaProp(gStates, #BeenThere), #F69) = 0 then set fieldNum to the number of cast "PerCentField1.txt" repeat with i = 1 to 4 put " " into field fieldNum set fieldNum to fieldNum + 1 end repeat end if end on doF69VoiceOver set scannerObj to getaProp(gObjects, #Scanner) set VOPlayList to getaProp(getaProp(gObjects, #Scanner), #VOPlayList) set VOTicks to getaProp(getaProp(gObjects, #Scanner), #VOTicks) if (count(getaProp(getaProp(gObjects, #Scanner), #subPuzzlesSolved)) = 3) and (getPos(VOPlayList, "F66FG05.aif") = 0) then killAnyFernsleyVOPlaying() killFAmbientSound() playSound("F66FG05.aif", #keyframeFile) if not voidp(getaProp(scannerObj, #timer)) then DeletetheTimer(getAt(getaProp(scannerObj, #timer), 1)) end if set soundSymbol to value("#" & "F66FG05.aif") set soundTicks to getaProp(VOTicks, soundSymbol) set soundTimer to Startthetimer(soundTicks + 30, "restartFAmbientSound", #Scanner) addUnique(VOPlayList, "F66FG05.aif") MakeDynamic(#Scanner, #VOPlayList, VOPlayList) else if (getaProp(getaProp(gStates, #BeenThere), #F69) = 1) and (getaProp(getaProp(gObjects, #Scanner), #timesScanButtonClicked) >= 7) and (count(getaProp(getaProp(gObjects, #Scanner), #subPuzzlesSolved)) = 0) then killAnyFernsleyVOPlaying() killFAmbientSound() playSound("F66FW02.aif", #keyframeFile) if not voidp(getaProp(scannerObj, #timer)) then DeletetheTimer(getAt(getaProp(scannerObj, #timer), 1)) end if set soundSymbol to value("#" & "F66FW02.aif") set soundTicks to getaProp(VOTicks, soundSymbol) set soundTimer to Startthetimer(soundTicks + 30, "restartFAmbientSound", #Scanner) else if (getaProp(getaProp(gStates, #BeenThere), #F69) = 1) and (getaProp(getaProp(gObjects, #Scanner), #timesScanButtonClicked) = 6) and (count(getaProp(getaProp(gObjects, #Scanner), #subPuzzlesSolved)) = 0) then killAnyFernsleyVOPlaying() killFAmbientSound() playSound("F66FW03.aif", #keyframeFile) if not voidp(getaProp(scannerObj, #timer)) then DeletetheTimer(getAt(getaProp(scannerObj, #timer), 1)) end if set soundSymbol to value("#" & "F66FW03.aif") set soundTicks to getaProp(VOTicks, soundSymbol) set soundTimer to Startthetimer(soundTicks + 30, "restartFAmbientSound", #Scanner) else if (getaProp(getaProp(gStates, #BeenThere), #F69) = 1) and (getaProp(getaProp(gObjects, #Scanner), #timesScanButtonClicked) = 5) and (count(getaProp(getaProp(gObjects, #Scanner), #subPuzzlesSolved)) = 0) then killAnyFernsleyVOPlaying() killFAmbientSound() playSound("F66FW01.aif", #keyframeFile) if not voidp(getaProp(scannerObj, #timer)) then DeletetheTimer(getAt(getaProp(scannerObj, #timer), 1)) end if set soundSymbol to value("#" & "F66FW01.aif") set soundTicks to getaProp(VOTicks, soundSymbol) set soundTimer to Startthetimer(soundTicks + 30, "restartFAmbientSound", #Scanner) else if (getaProp(getaProp(gStates, #BeenThere), #F69) = 1) and (getaProp(getaProp(gObjects, #Scanner), #timesScanButtonClicked) = 4) and (count(getaProp(getaProp(gObjects, #Scanner), #subPuzzlesSolved)) = 0) then killAnyFernsleyVOPlaying() killFAmbientSound() playSound("F66FW01.aif", #keyframeFile) if not voidp(getaProp(scannerObj, #timer)) then DeletetheTimer(getAt(getaProp(scannerObj, #timer), 1)) end if set soundSymbol to value("#" & "F66FW01.aif") set soundTicks to getaProp(VOTicks, soundSymbol) set soundTimer to Startthetimer(soundTicks + 30, "restartFAmbientSound", #Scanner) end if end if end if end if end if end on killFAmbientSound if not voidp(getaProp(gSoundchannels, 2)) then stopsound(getaProp(getaProp(gSoundchannels, 2), #name)) end if end on restartFAmbientSound playSound("Fambt1.aif", #AmbientLoop) end on timeSound inName set longName to "CHAOS:DATA:F_Enviro:F_Sfx:" & inName set startTime to the ticks sound playFile 1, longName repeat while soundBusy(1) nothing() end repeat set endTime to the ticks set soundTime to endTime - startTime end on killAnyFernsleyVOPlaying if not voidp(gSoundchannels) then if count(gSoundchannels) > 0 then repeat with i = 1 to count(gSoundchannels) set channelNum to getPropAt(gSoundchannels, i) set channelInfo to getaProp(gSoundchannels, channelNum) set soundName to getaProp(channelInfo, #name) if soundName contains "F66F" then stopsound(soundName) end if end repeat end if end if end on releasePapers if count(getaProp(getaProp(gObjects, #scanpapers), #paperLocRects)) = 16 then shufflePapers() repeat with i = 1 to 16 set paperRef to value("#Paper" & string(i)) set OBj to getaProp(gObjects, paperRef) set the loc of sprite getaProp(OBj, #SpriteNum) to getaProp(OBj, #loc) set hotrectnum to integer(getaProp(OBj, #SpriteNum) & "01") setaProp(getaProp(gHotRects, hotrectnum), #rect, getAt(getaProp(OBj, #Hotrect), 1)) updateStage() end repeat end if end on shufflePapers set paperLocRectList to getaProp(getaProp(gObjects, #scanpapers), #paperLocRects) repeat with i = 1 to 16 set paperRef to value("#Paper" & string(i)) set the randomSeed to the ticks set ranIndex to random(count(paperLocRectList)) if ranIndex = 0 then set ranIndex to 1 end if set thisProp to getPropAt(paperLocRectList, ranIndex) set thisElement to getaProp(paperLocRectList, thisProp) MakeDynamic(paperRef, #loc, getAt(thisElement, 1)) MakeDynamic(paperRef, #Hotrect, getAt(thisElement, 2)) deleteProp(paperLocRectList, thisProp) end repeat MakeDynamic(#scanpapers, #paperLocRects, [:]) end on DoScanLever set scannerObj to getaProp(gObjects, #Scanner) set VOPlayList to getaProp(getaProp(gObjects, #Scanner), #VOPlayList) set VOTicks to getaProp(getaProp(gObjects, #Scanner), #VOTicks) if count(getaProp(getaProp(gObjects, #Scanner), #subPuzzlesSolved)) = 4 then if (value(field "PerCentField1.txt") = 9) and (value(field "PerCentField2.txt") = 42) and (value(field "PerCentField3.txt") = 22) and (value(field "PerCentField4.txt") = 27) and (getaProp(getaProp(gObjects, #Scanner), #solved) = #false) then MakeDynamic(#Scanner, #solved, #true) setaProp(getaProp(gStates, #Conditions), #Forest, #true) playSound("F69lever.aif", #keyframeCast, 1) Startthetimer(10, "growTrees") else playSound("F69fail.aif", #keyframeCast, 1) killAnyFernsleyVOPlaying() killFAmbientSound() playSound("F66FG06.aif", #keyframeFile) if not voidp(getaProp(scannerObj, #timer)) then DeletetheTimer(getAt(getaProp(scannerObj, #timer), 1)) end if set soundSymbol to value("#" & "F66FG06.aif") set soundTicks to getaProp(VOTicks, soundSymbol) set soundTimer to Startthetimer(soundTicks + 30, "restartFAmbientSound", #Scanner) end if else playSound("F69fail.aif", #keyframeCast) end if set timesLeverPulled to getaProp(getaProp(gObjects, #Scanner), #timesLeverPulled) set timesLeverPulled to timesLeverPulled + 1 MakeDynamic(#Scanner, #timesLeverPulled, timesLeverPulled) if (getaProp(getaProp(gObjects, #Scanner), #timesLeverPulled) = 3) and (getaProp(getaProp(gObjects, #Scanner), #solved) = #false) then PDARelease("J04m26p.mov") end if end on DoScanLever2 if getaProp(getaProp(gObjects, #Scanner), #solved) = #true then playSound("F69lever.aif", #keyframeCast) Startthetimer(10, "growTrees") end if end on growTrees set LastKeyRef to #F69G set NextKeyRef to setKFGlobals(#F68B) DoTransition(LastKeyRef, NextKeyRef) set gLastCursor to getaProp(gCursorlist, #NullCursor) set the rect of sprite sQTSPRITE to rect(0, 0, 560, 336) go("TransQT") delScreenState() end on DoScanPaper OBJref set OBj to getaProp(gObjects, OBJref) set scannerObj to getaProp(gObjects, #Scanner) set scanSurface to getaProp(getaProp(gObjects, #Scanner), #scanSurfaceRect) set paperIndex to getPos(getaProp(getaProp(gObjects, #Scanner), #papersOnScanner), OBJref) if (getaProp(OBj, #DisplayState) = #INIT) and inside(getaProp(OBj, #loc), scanSurface) then if voidp(getaProp(getaProp(scannerObj, #papersOnScanner), OBJref)) then setaProp(getaProp(scannerObj, #papersOnScanner), OBJref, getaProp(OBj, #SpriteNum)) MakeDynamic(#Scanner, #papersOnScanner, getaProp(scannerObj, #papersOnScanner)) end if end if if (getaProp(OBj, #DisplayState) = #INIT) and ((count(getaProp(scannerObj, #papersOnScanner)) > 4) or not inside(getaProp(OBj, #loc), scanSurface)) then if not voidp(getaProp(getaProp(scannerObj, #papersOnScanner), OBJref)) then deleteProp(getaProp(scannerObj, #papersOnScanner), OBJref) MakeDynamic(#Scanner, #papersOnScanner, getaProp(scannerObj, #papersOnScanner)) end if returnToOrigPos(OBJref) end if end on returnToOrigPos OBJref set OBj to getaProp(gObjects, OBJref) set the loc of sprite getaProp(OBj, #SpriteNum) to getaProp(OBj, #OriginalLOC) MakeDynamic(OBJref, #loc, the loc of sprite getaProp(OBj, #SpriteNum)) MakeDynamic(OBJref, #Hotrect, value(string(getaProp(OBj, #OriginalHotrect)))) set hotrectnum to integer(getaProp(OBj, #SpriteNum) & "01") setaProp(getaProp(gHotRects, hotrectnum), #rect, getAt(getaProp(OBj, #Hotrect), 1)) end on DoClearButton set papersOnScanner to getaProp(getaProp(gObjects, #Scanner), #papersOnScanner) repeat with i = 1 to count(papersOnScanner) set the castNum of sprite getAt(papersOnScanner, i) to the number of cast getaProp(getaProp(getaProp(gObjects, getPropAt(papersOnScanner, i)), #cast), #INIT) MakeDynamic(getPropAt(papersOnScanner, i), #DisplayState, #INIT) set the ink of sprite getAt(papersOnScanner, i) to 0 MakeDynamic(getPropAt(papersOnScanner, i), #SpriteProp, [#ink: 0]) returnToOrigPos(getPropAt(papersOnScanner, i)) end repeat MakeDynamic(#Scanner, #papersOnScanner, [:]) end on DoScanButton set OBJref to #scanBeam set OBj to getaProp(gObjects, #scanBeam) set beamSprite to getaProp(OBj, #SpriteNum) set flag to #createPolygons set papersOnScanner to getaProp(getaProp(gObjects, #Scanner), #papersOnScanner) set timesScanButtonClicked to getaProp(getaProp(gObjects, #Scanner), #timesScanButtonClicked) set timesScanButtonClicked to timesScanButtonClicked + 1 MakeDynamic(#Scanner, #timesScanButtonClicked, timesScanButtonClicked) set polygonCount to 0 repeat with i = 1 to count(papersOnScanner) if getaProp(getaProp(gObjects, getPropAt(papersOnScanner, i)), #DisplayState) = #polygon then set polygonCount to polygonCount + 1 end if end repeat if polygonCount = 4 then set flag to checkSubPuzzleSolution() end if playSound("F69scan.aif", #keyframeCast) set the loc of sprite beamSprite to getaProp(OBj, #startloc) updateStage() if gCPU = #mpc then set myTimer to the ticks repeat while the ticks < (myTimer + 15) CursorandUpdate() end repeat end if repeat while the locV of sprite beamSprite > getAt(getaProp(OBj, #EndLoc), 2) set the loc of sprite beamSprite to the loc of sprite beamSprite - point(0, 4) set scanRect to rect(the left of sprite beamSprite, the bottom of sprite beamSprite, the right of sprite beamSprite, the bottom of sprite beamSprite + 5) if flag = #createPolygons then createPolygons(beamSprite, papersOnScanner, scanRect) else if flag <> #noSolution then sendPolygonsNorth(flag, beamSprite, papersOnScanner, scanRect) end if end if CursorandUpdate() end repeat if (flag <> #noSolution) and (flag <> #createPolygons) then createSubPuzzleIcon(flag, papersOnScanner) set subPuzzlesSolved to getaProp(getaProp(gObjects, #Scanner), #subPuzzlesSolved) add(subPuzzlesSolved, flag) MakeDynamic(#Scanner, #subPuzzlesSolved, subPuzzlesSolved) MakeDynamic(#Scanner, #papersOnScanner, [:]) setTextField(flag) end if set the loc of sprite beamSprite to point(-2000, -2000) updateStage() stopsound("F69scan.aif") doF69VoiceOver() end on createPolygons inBeamSprite, InPapersList, inScanRect repeat with i = 1 to count(InPapersList) set paperRef to getPropAt(InPapersList, i) set SpriteNum to getAt(InPapersList, i) set paperObj to getaProp(gObjects, paperRef) set thisConstrainRect to getaProp(paperObj, #constrainRect) if getaProp(getaProp(gObjects, getPropAt(InPapersList, i)), #DisplayState) <> #polygon then if intersect(inScanRect, the rect of sprite SpriteNum) > rect(0, 0, 0, 0) then MakeDynamic(paperRef, #DisplayState, #polygon) set the castNum of sprite SpriteNum to the number of cast getaProp(getaProp(getaProp(gObjects, paperRef), #cast), #polygon) if not inside(the loc of sprite SpriteNum, thisConstrainRect) then if the locH of sprite SpriteNum < getAt(thisConstrainRect, 1) then set the locH of sprite SpriteNum to getAt(thisConstrainRect, 1) end if if the locH of sprite SpriteNum > getAt(thisConstrainRect, 3) then set the locH of sprite SpriteNum to getAt(thisConstrainRect, 3) end if if the locV of sprite SpriteNum < getAt(thisConstrainRect, 2) then set the locV of sprite SpriteNum to getAt(thisConstrainRect, 2) end if if the locV of sprite SpriteNum > getAt(thisConstrainRect, 4) then set the locV of sprite SpriteNum to getAt(thisConstrainRect, 4) end if end if MakeDynamic(paperRef, #loc, the loc of sprite SpriteNum) set the ink of sprite getAt(InPapersList, i) to 33 MakeDynamic(paperRef, #SpriteProp, [#ink: 33]) updateStage() set hotrectnum to integer(getaProp(paperObj, #SpriteNum) & "01") MakeDynamic(paperRef, #Hotrect, [the rect of sprite SpriteNum]) setaProp(getaProp(gHotRects, hotrectnum), #rect, getAt(getaProp(paperObj, #Hotrect), 1)) end if end if end repeat end on sendPolygonsNorth OBJref, inBeamSprite, InPapersList, inScanRect repeat with i = 1 to count(InPapersList) if intersect(inScanRect, the rect of sprite getAt(InPapersList, i)) > rect(0, 0, 0, 0) then set the constraint of sprite getAt(InPapersList, i) to 0 set the loc of sprite getAt(InPapersList, i) to point(-2000, -2000) MakeDynamic(getPropAt(InPapersList, i), #loc, point(-2000, -2000)) updateStage() set paperRef to getPropAt(InPapersList, i) set paperObj to getaProp(gObjects, paperRef) set hotrectnum to integer(getaProp(paperObj, #SpriteNum) & "01") MakeDynamic(paperRef, #Hotrect, [the rect of sprite getaProp(paperObj, #SpriteNum)]) setaProp(getaProp(gHotRects, hotrectnum), #rect, getAt(getaProp(paperObj, #Hotrect), 1)) end if end repeat end on createSubPuzzleIcon OBJref, InPapersList set spritesSentNorth to 0 repeat with j = 1 to count(InPapersList) if the loc of sprite getAt(InPapersList, j) = point(-2000, -2000) then set spritesSentNorth to spritesSentNorth + 1 end if end repeat if spritesSentNorth = 4 then set the loc of sprite getaProp(getaProp(gObjects, OBJref), #SpriteNum) to getaProp(getaProp(gObjects, OBJref), #loc2) MakeDynamic(OBJref, #loc, getaProp(getaProp(gObjects, OBJref), #loc2)) end if end on checkSubPuzzleSolution set OBj to getaProp(gObjects, #Scanner) set solutionsObj to getaProp(getaProp(gObjects, #Scanner), #SubPuzzleSolutions) set papersOnScannerPropList to getaProp(getaProp(gObjects, #Scanner), #papersOnScanner) set papersOnScannerLinearList to [] repeat with i = 1 to count(papersOnScannerPropList) add(papersOnScannerLinearList, getPropAt(papersOnScannerPropList, i)) end repeat sort(papersOnScannerLinearList) repeat with i = 1 to count(solutionsObj) set thisSubPuzzleRef to getPropAt(solutionsObj, i) set thisSolutionList to getaProp(solutionsObj, thisSubPuzzleRef) sort(thisSolutionList) if thisSolutionList = papersOnScannerLinearList then if checkPolygonAligment() then return thisSubPuzzleRef end if end if end repeat return #noSolution end on checkPolygonAligment set alignCount to 0 set papersOnScannerPropList to getaProp(getaProp(gObjects, #Scanner), #papersOnScanner) set rectHalfSize to 15 set locHTotal to 0 set locVTotal to 0 repeat with i = 1 to count(papersOnScannerPropList) set locHTotal to locHTotal + the locH of sprite getAt(papersOnScannerPropList, 1) set locVTotal to locVTotal + the locV of sprite getAt(papersOnScannerPropList, 1) end repeat set locHAverage to integer(locHTotal / count(papersOnScannerPropList)) set locVAverage to integer(locVTotal / count(papersOnScannerPropList)) set alignmentRect to rect(locHAverage - rectHalfSize, locVAverage - rectHalfSize, locHAverage + rectHalfSize, locVAverage + rectHalfSize) repeat with i = 1 to count(papersOnScannerPropList) if inside(the loc of sprite getAt(papersOnScannerPropList, i), alignmentRect) then set alignCount to alignCount + 1 end if end repeat if alignCount = 4 then return 1 else return 0 end if end on setTextField OBJref if OBJref = #SubPuzzle1 then put "00" into field "PerCentField1.txt" else if OBJref = #SubPuzzle2 then put "00" into field "PerCentField2.txt" else if OBJref = #SubPuzzle3 then put "00" into field "PerCentField3.txt" else if OBJref = #SubPuzzle4 then put "00" into field "PerCentField4.txt" end if end if end if end if end on DoTenPerCent OBJref set subPuzzlesSolved to getaProp(getaProp(gObjects, #Scanner), #subPuzzlesSolved) if (OBJref = #PerCent10HotRect1) and (getPos(subPuzzlesSolved, #SubPuzzle1) > 0) then set firstDigit to value(char 1 of field "PerCentField1.txt") if firstDigit < 9 then set firstDigit to firstDigit + 1 else set firstDigit to 0 end if playSound("F69num.aif", #keyframeCast) put string(firstDigit) into char 1 of field "PerCentField1.txt" else if (OBJref = #PerCent10HotRect2) and (getPos(subPuzzlesSolved, #SubPuzzle2) > 0) then set firstDigit to value(char 1 of field "PerCentField2.txt") if firstDigit < 9 then set firstDigit to firstDigit + 1 else set firstDigit to 0 end if playSound("F69num.aif", #keyframeCast) put string(firstDigit) into char 1 of field "PerCentField2.txt" else if (OBJref = #PerCent10HotRect3) and (getPos(subPuzzlesSolved, #SubPuzzle3) > 0) then set firstDigit to value(char 1 of field "PerCentField3.txt") if firstDigit < 9 then set firstDigit to firstDigit + 1 else set firstDigit to 0 end if playSound("F69num.aif", #keyframeCast) put string(firstDigit) into char 1 of field "PerCentField3.txt" else if (OBJref = #PerCent10HotRect4) and (getPos(subPuzzlesSolved, #SubPuzzle4) > 0) then set firstDigit to value(char 1 of field "PerCentField4.txt") if firstDigit < 9 then set firstDigit to firstDigit + 1 else set firstDigit to 0 end if playSound("F69num.aif", #keyframeCast) put string(firstDigit) into char 1 of field "PerCentField4.txt" end if end if end if end if end on DoOnePerCent OBJref set subPuzzlesSolved to getaProp(getaProp(gObjects, #Scanner), #subPuzzlesSolved) if (OBJref = #PerCent01HotRect1) and (getPos(subPuzzlesSolved, #SubPuzzle1) > 0) then set secondDigit to value(char 2 of field "PerCentField1.txt") if secondDigit < 9 then set secondDigit to secondDigit + 1 else set secondDigit to 0 end if playSound("F69num.aif", #keyframeCast) put string(secondDigit) into char 2 of field "PerCentField1.txt" else if (OBJref = #PerCent01HotRect2) and (getPos(subPuzzlesSolved, #SubPuzzle2) > 0) then set secondDigit to value(char 2 of field "PerCentField2.txt") if secondDigit < 9 then set secondDigit to secondDigit + 1 else set secondDigit to 0 end if playSound("F69num.aif", #keyframeCast) put string(secondDigit) into char 2 of field "PerCentField2.txt" else if (OBJref = #PerCent01HotRect3) and (getPos(subPuzzlesSolved, #SubPuzzle3) > 0) then set secondDigit to value(char 2 of field "PerCentField3.txt") if secondDigit < 9 then set secondDigit to secondDigit + 1 else set secondDigit to 0 end if playSound("F69num.aif", #keyframeCast) put string(secondDigit) into char 2 of field "PerCentField3.txt" else if (OBJref = #PerCent01HotRect4) and (getPos(subPuzzlesSolved, #SubPuzzle4) > 0) then set secondDigit to value(char 2 of field "PerCentField4.txt") if secondDigit < 9 then set secondDigit to secondDigit + 1 else set secondDigit to 0 end if playSound("F69num.aif", #keyframeCast) put string(secondDigit) into char 2 of field "PerCentField4.txt" end if end if end if end if end on GrabDragScanPapers OBJref set OBj to getaProp(gObjects, OBJref) cursor(getaProp(gCursorlist, #Grab)) if not voidp(getaProp(getaProp(OBj, #sound), #down)) then playSound(getaProp(getaProp(OBj, #sound), #down), #keyframeCast) end if if getaProp(OBj, #DisplayState) = #INIT then set H to the mouseH set V to the mouseV set OffsetH to H - the locH of sprite getaProp(OBj, #SpriteNum) set OffsetV to V - the locV of sprite getaProp(OBj, #SpriteNum) repeat while the mouseDown set H to the mouseH set V to the mouseV set the locV of sprite getaProp(OBj, #SpriteNum) to V - OffsetV set the locH of sprite getaProp(OBj, #SpriteNum) to H - OffsetH CursorandUpdate() end repeat else if getaProp(OBj, #DisplayState) = #polygon then set thisConstrainRect to getaProp(OBj, #constrainRect) set H to the mouseH set V to the mouseV set poffsetH to H - the locH of sprite getaProp(OBj, #SpriteNum) set poffsetV to V - the locV of sprite getaProp(OBj, #SpriteNum) repeat while the mouseDown set H to the mouseH set V to the mouseV set the locV of sprite getaProp(OBj, #SpriteNum) to V - poffsetV set the locH of sprite getaProp(OBj, #SpriteNum) to H - poffsetH if not inside(the loc of sprite getaProp(OBj, #SpriteNum), thisConstrainRect) then if the locH of sprite getaProp(OBj, #SpriteNum) < getAt(thisConstrainRect, 1) then set the locH of sprite getaProp(OBj, #SpriteNum) to getAt(thisConstrainRect, 1) end if if the locH of sprite getaProp(OBj, #SpriteNum) > getAt(thisConstrainRect, 3) then set the locH of sprite getaProp(OBj, #SpriteNum) to getAt(thisConstrainRect, 3) end if if the locV of sprite getaProp(OBj, #SpriteNum) < getAt(thisConstrainRect, 2) then set the locV of sprite getaProp(OBj, #SpriteNum) to getAt(thisConstrainRect, 2) end if if the locV of sprite getaProp(OBj, #SpriteNum) > getAt(thisConstrainRect, 4) then set the locV of sprite getaProp(OBj, #SpriteNum) to getAt(thisConstrainRect, 4) end if end if CursorandUpdate() end repeat end if end if if not voidp(getaProp(getaProp(OBj, #sound), #UP)) then playSound(getaProp(getaProp(OBj, #sound), #UP), #keyframeCast) end if cursor(getaProp(gCursorlist, #Hand)) updateStage() DynamicLOCRECT2(OBJref) do(getaProp(getaProp(OBj, #Action), #UP)) CursorandUpdate() end on DynamicLOCRECT2 OBJref set OBj to getaProp(gObjects, OBJref) if not voidp(getaProp(OBj, #Hotrect)) then if voidp(getaProp(OBj, #OriginalHotrect)) then MakeDynamic(OBJref, #OriginalHotrect, value(string(getaProp(OBj, #Hotrect)))) end if MakeDynamic(OBJref, #Hotrect, [the rect of sprite getaProp(OBj, #SpriteNum)]) set hotrectnum to integer(getaProp(OBj, #SpriteNum) & "01") setaProp(getaProp(gHotRects, hotrectnum), #rect, getAt(getaProp(OBj, #Hotrect), 1)) else if not voidp(getaProp(OBj, #SpriteProp)) then if not voidp(getaProp(getaProp(OBj, #SpriteProp), #rect)) then if voidp(getaProp(OBj, #Originalrect)) then setaProp(OBj, #Originalrect, value(string(getaProp(getaProp(OBj, #SpriteProp), #rect)))) end if setaProp(getaProp(OBj, #SpriteProp), #rect, the rect of sprite getaProp(OBj, #SpriteNum)) end if end if end if if not voidp(getaProp(OBj, #loc)) then if voidp(getaProp(OBj, #OriginalLOC)) then MakeDynamic(OBJref, #OriginalLOC, value(string(getaProp(OBj, #loc)))) end if MakeDynamic(OBJref, #loc, the loc of sprite getaProp(OBj, #SpriteNum)) end if end on toggleScanner if getaProp(getaProp(gObjects, #Scanner), #solved) = #true then setaProp(getaProp(gObjects, #Scanner), #solved, #false) else setaProp(getaProp(gObjects, #Scanner), #solved, #true) end if put "scannerSolved" && getaProp(getaProp(gObjects, #Scanner), #solved) end on toggleScanpapers if getaProp(getaProp(gObjects, #scanpapers), #solved) = #true then setaProp(getaProp(gObjects, #scanpapers), #solved, #false) else setaProp(getaProp(gObjects, #scanpapers), #solved, #true) end if put "scanpapersSolved" && getaProp(getaProp(gObjects, #scanpapers), #solved) end on findAllPapers AddObjects([#BagObj]) setaProp(getaProp(gObjects, #BagObj), #Aquired, #true) set Papers to getaProp(gObjects, #scanpapers) repeat with i = 1 to 16 set OBJref to value("#" & "Paper" & i) add(getaProp(Papers, #Children), OBJref) end repeat MakeDynamic(#scanpapers, #State, #on) Jumptokey(#F69) end on pickUpPapers if getaProp(getaProp(gObjects, #BagObj), #Aquired) = #false then setaProp(getaProp(gObjects, #BagObj), #Aquired, #true) end if set Papers to getaProp(gObjects, #scanpapers) set papersFound to getaProp(Papers, #Children) repeat with i = 1 to 16 set OBJref to value("#" & "Paper" & i) addUnique(papersFound, OBJref) set FindObjRef to value("#" & "FindPaper" & i) MakeDynamic(FindObjRef, #Hotrect, [rect(0, 0, 0, 0)]) MakeDynamic(FindObjRef, #DisplayState, #false) end repeat MakeDynamic(#scanpapers, #State, #on) MakeDynamic(#scanpapers, #solved, #true) MakeDynamic(#scanpapers, #Children, papersFound) end